/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 数据源任务同步类型枚举类
 *
 * @author wujialin
 * @date 2024-10-12
 */
@AllArgsConstructor
@Getter
public enum IsfdDatasourceSyncTypeEnum {

    OFFLINE_SYNC("OFFLINE_SYNC", "离线同步"),
    REAL_TIME_SYNC("REAL_TIME_SYNC", "实时同步");

    private final String value;
    private final String desc;

    public static String getDescByValue(String value) {
        for (IsfdDatasourceSyncTypeEnum type : values()) {
            if (type.getValue().equals(value)) {
                return type.getDesc();
            }
        }
        return null;
    }
}
